package com.qlmy.cn.ui.activity

import android.app.Activity
import com.qlmy.cn.commom.startKtxActivity
import com.qlmy.cn.helper.InjectBundle
import com.qlmy.cn.ui.base.BaseActivity
import com.qlmy.cn.ui.viewmodel.ApplicationViewModel
import com.qlmy.cn.ui.viewmodel.applicationViewModel
import com.wbs.shop.nuby.databinding.ActivityWebviewBinding

fun Activity.openUrl(url: String) {
    startKtxActivity<WebViewActivity>(value = WebViewActivity.URL to url)
}

class WebViewActivity : BaseActivity<ActivityWebviewBinding>() {
    private val mApplicationViewModel: ApplicationViewModel by applicationViewModel()

    companion object {
        const val URL = "url"
    }

//    private val url: String by InjectBundle()
//    override fun initView() {
//        viewBinding.webview.loadUrl(url)
//    }
//
//    override fun initData() {
//        viewBinding.webview.titleCangerListener = { viewBinding.titleView.titleStr = it }
//    }
}